﻿<sdk:Page x:Class="SampleBrowser.Views.SampleFontDetails" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="OpenType Font Details">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" 
                           Text="OpenType Font Details"/>

        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,4,0,10">
            <TextBlock Text="Font:" VerticalAlignment="Center" />
            <ComboBox x:Name="cmbFont" DisplayMemberPath="Name" Margin="4" SelectionChanged="cmbFont_SelectionChanged" />
            <Button x:Name="FromDisk" Margin="4" Padding="7" Click="FromDisk_Click">
                <Button.Content>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="/SampleBrowser;component/Assets/Icons/open.png" />
                        <TextBlock Text="Select font from disk..." Margin="4,0,0,0" FontWeight="Normal" />
                    </StackPanel>
                </Button.Content>
            </Button>
        </StackPanel>

        <sdk:TabControl Grid.Row="2">
            <sdk:TabItem Header="Font Details">
                <ScrollViewer Style="{StaticResource PageScrollViewerStyle}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150" />
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Row="0" Text="Font Type" />
                        <TextBlock Grid.Row="0" Grid.Column="1" x:Name="FontType" Text="{Binding FontType}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="1" Text="Family name" />
                        <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding FamilyName}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="2" Text="Face name"  />
                        <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding FaceName}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="3" Text="Glyph count"  />
                        <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding GlyphCount}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="4" Text="Description"  />
                        <TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Description}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="5" Text="Copyright"  />
                        <TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding Copyright}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="6" Text="License description"  />
                        <TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding LicenseDescription}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="7" Text="Embedding rights"  />
                        <TextBlock Grid.Row="7" Grid.Column="1" Text="{Binding EmbeddingRights}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="8" Text="Trademark"  />
                        <TextBlock Grid.Row="8" Grid.Column="1" Text="{Binding Trademark}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="9" Text="Designer name"  />
                        <TextBlock Grid.Row="9" Grid.Column="1" Text="{Binding DesignerName}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="10" Text="Designer url"  />
                        <HyperlinkButton Grid.Row="10" Grid.Column="1" Content="{Binding DesignerUrl}" NavigateUri="{Binding DesignerUrl}" TargetName="_blank"/>
                        <TextBlock Grid.Row="11" Text="Manufacturer name"  />
                        <TextBlock Grid.Row="11" Grid.Column="1" Text="{Binding ManufacturerName}" TextWrapping="Wrap"/>
                        <TextBlock Grid.Row="12" Text="Vendor url"  />
                        <HyperlinkButton Grid.Row="12" Grid.Column="1" Content="{Binding VendorUrl}" NavigateUri="{Binding VendorUrl}" TargetName="_blank"/>
                        <TextBlock Grid.Row="13" Text="Version"  />
                        <TextBlock Grid.Row="13" Grid.Column="1" Text="{Binding VersionString}" TextWrapping="Wrap"/>
                    </Grid>
                </ScrollViewer>
            </sdk:TabItem>
            <sdk:TabItem Header="Sample Text">
                <ScrollViewer Style="{StaticResource PageScrollViewerStyle}" HorizontalScrollBarVisibility="Auto">
                    <Grid Loaded="sampleTexts_Loaded">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <TextBlock x:Name="sample1" FontSize="16" Text="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ" />
                        <TextBlock x:Name="sample2" FontSize="16" Grid.Row="1" Text="1234567890.:,;'&quot;(!?)+-*/=" />
                        <Rectangle Grid.Row="2" HorizontalAlignment="Stretch" Margin="0,4,0,4" Stroke="Silver" StrokeThickness=".5" Height="1" />
                        <StackPanel Grid.Row="3" Orientation="Horizontal">
                            <TextBlock Text="12" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample3" FontSize="12" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                        <StackPanel Grid.Row="4" Orientation="Horizontal">
                            <TextBlock Text="18" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample4" FontSize="18" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                        <StackPanel Grid.Row="5" Orientation="Horizontal">
                            <TextBlock Text="24" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample5" FontSize="24" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                        <StackPanel Grid.Row="6" Orientation="Horizontal">
                            <TextBlock Text="36" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample6" FontSize="36" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                        <StackPanel Grid.Row="7" Orientation="Horizontal">
                            <TextBlock Text="48" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample7" FontSize="48" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                        <StackPanel Grid.Row="8" Orientation="Horizontal">
                            <TextBlock Text="60" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample8" FontSize="60" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                        <StackPanel Grid.Row="9" Orientation="Horizontal">
                            <TextBlock Text="72" VerticalAlignment="Center" Margin="0,0,16,0" />
                            <TextBlock x:Name="sample9" FontSize="72" Text="The quick brown fox jumps over the lazy dog. 1234567890" />
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
            </sdk:TabItem>
        </sdk:TabControl>
    </Grid>
</sdk:Page>
